import request from '@/utils/request'


export function examTypeTree() {
  return request({
    url: '/system/examType/tree',
    method: 'get'
  })
}

// 查询考试报名列表
export function listExam(query) {
  return request({
    url: '/system/exam/list',
    method: 'get',
    params: query
  })
}


export function wechatGetExam(examId) {
  return request({
    url: '/system/exam/' + examId,
    method: 'get'
  })
}



// 查询考试报名详细
export function getExam(examId) {
  return request({
    url: '/system/exam/' + examId,
    method: 'get'
  })
}

// 新增考试报名
export function addExam(data) {
  return request({
    url: '/system/exam',
    method: 'post',
    data: data
  })
}
export function approvedExam(data) {
  return request({
    url: '/system/exam/approved',
    method: 'post',
    data: data
  })
}


// 修改考试报名
export function updateExam(data) {
  return request({
    url: '/system/exam',
    method: 'put',
    data: data
  })
}

// 删除考试报名
export function delExam(examId) {
  return request({
    url: '/system/exam/' + examId,
    method: 'delete'
  })
}
